<?php
Prado::using('Application.common.common');
class BoxLatestAddition extends TRepeaterItemRenderer
{
	public function onDataBinding($param)
	{
		parent::onDataBinding($param);
		if (count($this->Data)>0)
		{
			if ($this->Data->ImageNewArrivalPath != "")
				$this->imgProductPhotoThumb->ImageUrl = $this->Request->UrlManagerModule->UrlPrefix."/useruploads/images/product/thumbs/".$this->Data->ImageNewArrivalPath;
			else
				$this->imgProductPhotoThumb->ImageUrl = $this->Request->UrlManagerModule->UrlPrefix."/useruploads/images/product/thumbs/".$this->Data->ThumbnailPath;
				
			if (strlen($this->Data->Brief)>55)			
				$this->lblDesc->Text = Common::neatTrim($this->Data->Brief,55,"") . "...";			
			else 
				$this->lblDesc->Text = $this->Data->Brief;	
		}
	}
}

?>